{% extends "index/index.html" %}

{% load static %}

{% block title %}Möwe - Stats{% endblock %}

{% block content %}
    <div class="d-flex flex-row bd-highlight mb-3 justify-content-center">

<!--         <div class="p-2 bd-highlight"><i class="fas fa-arrow-circle-left fa-2x"></i></div>
 -->
        <div class="p-2 bd-highlight" style="margin-top: -10px;"><h1>{{ year }}</h1></div>

<!--         <div class="p-2 bd-highlight"><i class="fas fa-arrow-circle-right fa-2x"></i></div>
 -->
    </div>
    <table class="table">
        <thead>
        <tr>
        <th scope="col">#</th>
        <th scope="col">Nutzername</th>
        <th scope="col">Stunden in diesem Jahr</th>
        </tr>
    </thead>
        <ol>
            {% for ranked_user in stats|dictsortreversed:1 %} <!-- Sortiert stats in umgekehrter Reihenfolge. -->
                <tr>
                    <th scope="row">{{ forloop.counter0|add:1 }}.</th>
                    <td><a href="{% url 'accountstats:account-detail' ranked_user.0 %}">{{ ranked_user.0 }}</a></td>
                    <td>{{ ranked_user.1 }}
                </tr>
            {% endfor %}
        </ol>
    </table>

{% endblock %}

{% block additionalCSS %}
<link rel="stylesheet" type="text/css" href="{% static 'accountstats/style.css' %}">
{% endblock %}
